#include "Measurer_Node.h"
Measurer_Node::Measurer_Node(){
	parent = (0);
	left=0;
	right=0;
//	spaces.resize(4);
}

void Measurer_Node::addSpace(ProSpace* space){
		spaces.push_back(space);

}
ProSpace& Measurer_Node::getSpace(int index){
		
	return *spaces[index];
}
const int Measurer_Node::sizeOf() const{
	return spaces.size();
}
void Measurer_Node::output(int index) const{
	for(int i=0; i<spaces.size();i++){
		spaces[i]->output(index);
	}
}
void Measurer_Node::updateSpace(ProSpace* sp, int index){
	spaces[index] = sp;
}

Measurer_Node::~Measurer_Node(){
	delete parent;
	delete left;
	delete right;
	parent = 0;
	left = 0;
	right = 0;
	int i = 0;
	for (i=0; i< spaces.size();i++){
		delete spaces[i];
		spaces[i] = 0;
	}
}